package com.hm.order.mongo.def;

/**
 * @author shishun.wang
 * @date 下午6:12:40 2016年7月14日
 * @version 1.0
 * @describe
 */
public enum OrderStatusOperation {

	/* 买家 */

	// 下订单
	PLACE_AN_ORDER(OrderOwner.BUYER, null, OrderOperationStatu.INITIALIZE),

	// 取消订单
	CANCEL_ORDER(OrderOwner.BUYER, OrderOperationStatu.INITIALIZE, OrderOperationStatu.CANCEL_ORDER),

	// 已收货
	DELIVERYED(OrderOwner.BUYER, OrderOperationStatu.SHIPMENTSED, OrderOperationStatu.DELIVERYED),

	// 退货
	SALES_RETURN(OrderOwner.BUYER, OrderOperationStatu.SHIPMENTSED, OrderOperationStatu.SALES_RETURN),

	/* 卖方 */

	// 接受订单-发货
	SHIPMENTSED(OrderOwner.SELLER, OrderOperationStatu.INITIALIZE, OrderOperationStatu.SHIPMENTSED),

	// 收货交易已完成
	DELIVERYED_FINISHED(OrderOwner.SELLER, OrderOperationStatu.INITIALIZE, OrderOperationStatu.SHIPMENTSED),

	// 退货完成
	SALES_RETURNED(OrderOwner.SELLER, OrderOperationStatu.SALES_RETURN, OrderOperationStatu.SALES_RETURNED)

	;

	/**
	 * 操作人类型
	 */
	private OrderOwner orderOwner;

	/**
	 * 当前状态
	 */
	private OrderOperationStatu curentStatu;

	/**
	 * 当前操作
	 */
	private OrderOperationStatu nextOperationStatu;

	private OrderStatusOperation(OrderOwner orderOwner, OrderOperationStatu curentStatu,
			OrderOperationStatu nextOperationStatu) {
		this.orderOwner = orderOwner;
		this.curentStatu = curentStatu;
		this.nextOperationStatu = nextOperationStatu;
	}

	public OrderOwner getOrderOwner() {
		return orderOwner;
	}

	public OrderOperationStatu getCurentStatu() {
		return curentStatu;
	}

	public OrderOperationStatu getNextOperationStatu() {
		return nextOperationStatu;
	}

}
